<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2019/1/13
  Time: 12:01
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%--用户数组 用户名、手机号--%>
<form action="" method="post">
</form>
<input type="text" name="userName"  id="username1"/>
<input type="text" name="phone" id="phone1"/>
<input type="text" name="userName" id="username2" />
<input type="text" name="phone"  id ="phone2"/>
<button type="submit" value="提交" id="submit" onclick="javascript:void(0)">提交</button>
</body>
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.3.1.min.js"></script>
<script type="application/javascript">
    $(function(){

        $("#submit").click(function(){

         var username1 = $("#username1").val();
         var phone1 = $("#phone1").val();
         var username2 = $("#username2").val();
         var phone2 = $("#phone2").val();

        // alert(user1);
        $.ajax({
            "url": "http://localhost:8080/admin/ads/getUsers",
            "data" : "users[0].username=" + username1 + "&users[0].phone=" + phone1 + "users[1].username=" + username2 + "&users[1].phone=" + phone2,
            "type": "post"
        } )
        }
        );
    })
</script>
</html>
